from typing import List, Dict
from shared.graph_client import GraphClient

class MailboxDiscoverer:
    def __init__(self, graph_client: GraphClient):
        self.client = graph_client
        
    def get_all_mailboxes(self) -> List[Dict]:
        """获取所有用户邮箱"""
        return list(self.client.paginate("users?$select=id,displayName,userPrincipalName,mail"))
    
    def get_shared_folders(self) -> List[Dict]:
        """获取共享文件夹"""
        return list(self.client.paginate("me/mailFolders?includeHiddenFolders=true"))
    
    def get_public_folders(self) -> List[Dict]:
        """获取公共文件夹"""
        return list(self.client.paginate("sites/root/drives?select=id,name"))